/*
 * Copyright (c) 2012 Tomas Shestakov. <http://code.google.com/p/jmmo/>
 */

package jmmo.engine.property

/**
 * Observable which contains other observables and can has listeners.
 * @author Tomas Shestakov
 */
trait ObservableContainer extends Observable with SilentObservableContainer {

  def observable(ids: Identifier*): Option[Observable]

  def observables: Iterable[Observable]

  /**
   * Returns `SilentObservableContainer` with same id, attributes and children as this.
   * @param filter a predicate which gets `Observable` and returns true if `Observable` pass the filter false otherwise.
   * @return `SilentObservable` with same content as this (Serializable and immutable recommended).
   */
  def serializedCopy(filter: Identifiable.Filter = Identifiable.passAll): SerializedObservableContainer
}
